<?php
defined('IN_PHPCMS') or exit('No permission resources.');
if(!defined('CACHE_MODEL_PATH')) define('CACHE_MODEL_PATH',PHPCMS_PATH.'caches'.DIRECTORY_SEPARATOR.'caches_model'.DIRECTORY_SEPARATOR.'caches_data'.DIRECTORY_SEPARATOR);

pc_base::load_sys_class('model', '', 0);
class reg_child_goods_model extends model {
	public function __construct() {
		$this->db_config = pc_base::load_config('database');
		$this->db_setting = 'default';
		$this->table_name = 'exchange_goods';
		parent::__construct();
	}

	/**
	 * 商品列表(一维数组)
	 */
	public function goodsList ()
	{
		$list = $this->select(array('status'=>1));
		$data = array();
		foreach ($list as $v) {
			$data[$v['id']] = $v['name'];
		}
		return $data;
	}
}
?>